import Vue from 'vue'
import Router from 'vue-router'

import Main from '../views/Main'
import Login from '../views/Login'
import courseList from '../views/courseList'
import teacherIndex from '../views/teacherIndex'
import courseDetail from '../views/courseDetail'
import teacherDetail from '@/views/teacherDetail'
import order from '@/views/order'
import pay from '@/views/pay'
import courseSearch from '@/views/courseSearch'
import memberDetail from "../views/member/memberDetail";
import myOrder from "../views/member/myOrder";

Vue.use(Router)

export default new Router({
  routes:[
    {
      path:'/Main',
      name:'Main',
      component:Main
    },
    {
      path:'/Login/:tab',
      name:'Login',
      component:Login
    },
    {
      path:'/courseList',
      name:'courseList',
      component:courseList,

    },
    {
      path:'/teacherIndex',
      name:'teacherIndex',
      component:teacherIndex,

    },
    {
      path:'/courseDetail/:id',
      name:'courseDetail',
      component:courseDetail
    },
    {
      path:'/teacherDetail/:id',
      name:'teacherDetail',
      component:teacherDetail
    },
    {
      path:'/order/:id',
      name:'order',
      component:order
    },
    {
      path:'/pay/:id',
      name:'pay',
      component:pay
    },
    {
      path:'/courseSearch/:title',
      name:'courseSearch',
      component:courseSearch
    },
    {
      path:'/courseSearch/:title',
      name:'courseSearch',
      component:courseSearch
    },
    {
      path:'/memberDetail',
      name:'memberDetail',
      component:memberDetail,
      children:[
        {
          path:'/myOrder',
          name:'myOrder',
          component:myOrder,
        }
      ]
    },

  ]
})
